<template>
	<view class="page">
		<!-- 头部导航 -->
		<!-- <view class="header-bag">
			<image src="/static/icon-Get-into@3.png" class="back-btn" @click="goBack"></image>
			<text class="page-title">更多申请</text>
		</view> -->

		<view class="wrapper">
			<!-- 状态切换标签 -->
			<view class="shenqing-state">
				<view class="state-item" :class="{ active: currentTab === 0 }" @click="switchTab(0)">
					<text class="state-text" :class="{ active: currentTab === 0 }">待申请</text>
				</view>
				<view class="state-item" :class="{ active: currentTab === 1 }" @click="switchTab(1)">
					<text class="state-text" :class="{ active: currentTab === 1 }">申请历史</text>
				</view>
				<view class="state-item" :class="{ active: currentTab === 2 }" @click="switchTab(2)">
					<text class="state-text" :class="{ active: currentTab === 2 }">合伙明细</text>
				</view>
			</view>

			<view class="divider"></view>

			<!-- 内容区域 -->
			<view class="content-area">
				<!-- 待申请 -->
				<view v-if="currentTab === 0" class="tab-content">
					<view class="apply-list">
						<view v-for="(item, index) in applyList" :key="index" class="apply-item">
							<view class="item-left">
								<view class="item-icon">
									<image :src="getIdentityIcon(item.identity)" :alt="item.identity"></image>
								</view>
								<view class="item-info">
									<text class="identity-name">{{ item.identity }}
										<text v-if="item.identity === '云主'" class="tips">({{ item.tips }})</text>
									</text>
									<text class="identity-desc">{{ getIdentityDesc(item.identity) }}
										<text class="learn-more" @click="learnMore(item.identity)">【收益规则】</text>
									</text>
								</view>
							</view>
							<view class="item-right" v-if="item.identity!='会员'">
								<view class="apply-btn" @click="handleApply(item)" :class="getApplyBtnClass(item)">
									<text class="btn-text">{{ getApplyBtnText(item) }}</text>
								</view>
							</view>
						</view>
					</view>
				</view>

				<!-- 申请历史 -->
				<view v-if="currentTab === 1" class="tab-content">
					<view v-if="historyList.length > 0" class="history-content">
						<view class="history-header">
							<text class="header-item">身份名称</text>
							<text class="header-item">购买份数</text>
							<text class="header-item">购买时间</text>
							<text class="header-item">其他</text>
						</view>
						<view class="history-list">
							<view v-for="(item, index) in historyList" :key="index" class="history-item">
								<text class="history-cell">{{ item.identity }}</text>
								<text class="history-cell">{{ item.buy_num }}</text>
								<text class="history-cell">{{ item.time }}</text>
								<view class="history-cell">
									<view  @click="handleHistoryAction(item)"
										:class="getHistoryBtnClass(item.state)">
										<text class="btn-text">{{ getHistoryBtnText(item) }}</text>
									</view>
								</view>
							</view>
						</view>
					</view>
					<view v-else class="empty-state">
						<image :src="serverAddress+'img/icon-ddwk@3x.png'" class="empty-icon"></image>
						<text class="empty-text">您还没有相关信息哦~</text>
					</view>
				</view>

				<!-- 合伙明细 -->
				<view v-if="currentTab === 2" class="tab-content">
					<view v-if="partnerList.length > 0" class="partner-content">
						<view class="partner-header">
							<text class="header-item">名称</text>
							<text class="header-item">购买份数</text>
							<text class="header-item">购买时间</text>
							<text class="header-item">其他</text>
						</view>
						<scroll-view scroll-y class="partner-scroll" @scrolltolower="loadMorePartner">
							<view class="partner-list">
								<view v-for="(item, index) in partnerList" :key="index" class="partner-item">
									<text class="partner-cell">{{ item.name }}</text>
									<text class="partner-cell">{{ item.partner_qual_num }}</text>
									<text class="partner-cell">{{ item.date }}</text>
									<view class="partner-cell">
										<view class="partner-btn" @click="handleInsurance(item)">
											<text class="btn-text">{{ item.policy_id == 0 ? '填写保障' : '查看保障' }}</text>
										</view>
									</view>
								</view>
							</view>
							<view v-if="partnerLoading" class="loading-more">
								<text>加载中...</text>
							</view>
						</scroll-view>
					</view>
					<view v-else class="no-partner">
						<image :src="serverAddress+'img/image/shenqing.png'" class="no-partner-img"></image>
						<view class="no-partner-text">亲，成为合伙人才有入股明细哦！</view>
						<view class="no-partner-text">可惜您现在还不是</view>
						<!-- <text class="no-partner-text">亲，成为合伙人才有入股明细哦！<br />可惜您现在还不是</text> -->
						<view class="no-partner-btn" @click="applyPartner">
							<text>去申请</text>
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 支付密码验证弹窗 -->
		<view v-if="showPayModal" class="pay-modal">
			<view class="pay-content">
				<view class="pay-header">
					<image src="/static/icon-Get-into@3.png" class="close-btn" @click="closePayModal"></image>
					<text class="pay-title">{{ payModalTitle }}</text>
				</view>
				<view class="pay-body">
					<text class="pay-tip">请输入支付密码</text>
					<input type="password" v-model="payPassword" maxlength="6" class="pay-input"
						@input="onPayPasswordInput" />
				</view>
			</view>
		</view>

		<!-- 温馨提示弹窗 -->
		<view v-if="showTipModal" class="tip-modal">
			<view class="tip-content">
				<text class="tip-title">温馨提示</text>
				<text class="tip-text">为了保护用户权益和资金安全</text>
				<text class="tip-text">需要实名认证后才能继续操作</text>
				<view class="tip-buttons">
					<text class="tip-btn cancel" @click="closeTipModal">稍后再说</text>
					<text class="tip-btn confirm" @click="goToIdentity">马上认证</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		applyApi
	} from '@/api/index.js'
	import {
		inject
	} from 'vue'
	export default {
		data() {
			return {
				serverAddress: inject('$serverAddress'),
				currentTab: 0, // 当前选中的标签：0-待申请，1-申请历史，2-合伙明细
				applyList: [], // 待申请列表
				historyList: [], // 申请历史列表
				partnerList: [], // 合伙明细列表
				partnerPage: 1, // 合伙明细分页
				partnerLoading: false, // 合伙明细加载状态
				showPayModal: false, // 显示支付密码弹窗
				payModalTitle: '检验支付密码', // 支付弹窗标题
				payPassword: '', // 支付密码
				payPasswordFirst: '', // 第一次输入的密码
				isSetPassword: false, // 是否已设置密码
				showTipModal: false, // 显示提示弹窗
				currentApplyItem: null, // 当前申请的项目
				payCallback: null // 支付成功回调
			}
		},

		onLoad(options) {
			// 检查是否从支付成功页面跳转过来
			if (options.fromsuccess) {
				this.currentTab = 2
			}
			this.loadApplyList()
			this.loadHistoryList()
		},

		methods: {
			// 返回上一页
			goBack() {
				uni.navigateBack({
					delta: 1
				})
			},

			// 切换标签
			switchTab(index) {
				this.currentTab = index
				if (index === 2 && this.partnerList.length === 0) {
					this.loadPartnerList()
				}
			},

			// 加载待申请列表
			async loadApplyList() {
				try {
					const res = await applyApi.getMoreApply()
					if (res.r === 0) {
						this.applyList = res.data.lists || []
					}
				} catch (error) {
					console.error('加载申请列表失败:', error)
				}
			},

			// 加载申请历史
			async loadHistoryList() {
				try {
					const res = await applyApi.getApplyHistory()
					if (res.r === 0) {
						this.historyList = res.data.lists || []
					}
				} catch (error) {
					console.error('加载申请历史失败:', error)
				}
			},

			// 加载合伙明细
			async loadPartnerList(page = 1) {
				if (this.partnerLoading) return

				this.partnerLoading = true
				try {
					const res = await applyApi.getApplyDetail({
						page
					})
					if (res.r === 0) {
						if (page === 1) {
							this.partnerList = res.data.lists || []
						} else {
							this.partnerList.push(...(res.data.lists || []))
						}
						this.partnerPage = page
					}
				} catch (error) {
					console.error('加载合伙明细失败:', error)
				} finally {
					this.partnerLoading = false
				}
			},

			// 加载更多合伙明细
			loadMorePartner() {
				this.loadPartnerList(this.partnerPage + 1)
			},

			// 获取身份图标
			getIdentityIcon(identity) {
				const iconMap = {
					'会员': this.serverAddress + 'img/icon_hy.png',
					'云主': this.serverAddress + 'img/cloudWork.png',
					'合伙人': this.serverAddress + 'img/Partn3x.png',
					'市运营': this.serverAddress + 'img/agentss1.png',
					'商家': this.serverAddress + 'img/businessman.png',
					'厂家': this.serverAddress + 'img/supplier.png'
				}
				return iconMap[identity] || '/static/supplier.png'
			},

			// 获取身份描述
			getIdentityDesc(identity) {
				const descMap = {
					'会员': '"享受平台自主消费分润的50%"',
					'云主': '"享受平台自主消费分润的60%"',
					'合伙人': '"享受每天平台的收益分润"',
					'市运营': '"享受所运营区域每月分润"',
					'商家': '"免店铺入驻费..."',
					'厂家': '"免厂家入驻费..."'
				}
				return descMap[identity] || ''
			},

			// 获取申请按钮样式
			getApplyBtnClass(item) {
				if (item.identity === '市运营') {
					if (item.state === 0 && item.apply_state === 2) return 'btn-disabled'
					if (item.state === 0 && item.apply_state === 4) return 'btn-disabled'
				}
				if (item.identity === '云主' && item.state === 1) return 'btn-renew'
				if ((item.identity === '商家' || item.identity === '厂家') && item.state === 1) return 'btn-disabled'
				return 'btn-normal'
			},

			// 获取申请按钮文字
			getApplyBtnText(item) {
				if (item.identity === '合伙人') {
					return item.state === 1 ? '追加份额' : '去申请'
				}
				if (item.identity === '市运营') {
					if (item.state === 1) return '已申请'
					if (item.state === 0) {
						if (item.apply_state === 0) return '去申请'
						if (item.apply_state === 1) return '缴费凭证'
						if (item.apply_state === 2) return '待审核'
						if (item.apply_state === 3) return '修改信息'
					}
					if (item.state === 3) return '追加金额'
					if (item.state === 5) return '去申请'
				}
				if (item.identity === '云主') {
					if (item.state === 0 || item.state === 3) return '去申请'
					if (item.state === 1) return '立即续费'
					if (item.state === 2) return '审核未通过'
					if (item.state === 4) return '审核中'
				}
				if (item.identity === '商家' || item.identity === '厂家') {
					if (item.state === 0 || item.state === 3) return '去申请'
					if (item.state === 1) return '已申请'
					if (item.state === 2) return '审核未通过'
					if (item.state === 4) return '审核中'
				}
				return '去申请'
			},

			// 获取历史按钮样式
			getHistoryBtnClass(state) {
				if ([1, 4, 6, 7, 8, 11, 12].includes(state)) return 'btn-disabled'
				return 'btn-normal'
			},

			// 获取历史按钮文字
			getHistoryBtnText(item) {
				const textMap = {
					1: item.identity === '市运营' ? '已通过' : '已通过',
					2: '修改信息',
					3: '排行榜',
					4: '审核中',
					6: '退出市运营审核中',
					7: '已退出市运营',
					8: '退出市运营被驳回',
					11: '申请未支付',
					12: '待审核'
				}
				return textMap[item.state] || '未知状态'
			},

			// 处理申请操作
			async handleApply(item) {
				this.currentApplyItem = item

				// 检查是否需要实名认证
				// const needIdentity = await this.checkIdentityRequired(item)
				// if (needIdentity) {
				// 	this.showTipModal = true
				// 	return
				// }

				// 根据不同身份处理申请
				if (item.identity === '市运营') {
					await this.handleCityAgentApply(item)
				} else if (item.identity === '合伙人') {
					this.handlePartnerApply(item)
				} else if (item.identity === '云主') {
					await this.handleCloudWorkerApply(item)
				} else if (item.identity === '商家') {
					this.handleBusinessApply()
				} else if (item.identity === '厂家') {
					this.handleFactoryApply()
				}
			},

			// 检查是否需要实名认证
			async checkIdentityRequired(item) {
				try {
					const res = await applyApi.getIdentityInfo()
					return res.r !== 0 || !res.data.is_identity
				} catch (error) {
					return true
				}
			},

			// 处理市运营申请
			async handleCityAgentApply(item) {
				try {
					const res = await applyApi.checkAgentApply()
					if (res.r < 0) {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
						return
					}

					if (item.states == 1 || item.states == 3) {
						// 追加份额
						uni.navigateTo({
							url: '/pages/identity/buyCooperativeIdentity_hhrzz?cityAgent=1'
						})
					} else {
						// 申请市运营
						uni.navigateTo({
							url: '/pages/identity/write-agent?cityAgent=0'
						})
					}
				} catch (error) {
					uni.showToast({
						title: '操作失败',
						icon: 'none'
					})
				}
			},

			// 处理合伙人申请
			handlePartnerApply(item) {
				const added = item.states == 1 ? 1 : 0
				uni.navigateTo({
					url: `/pages/identity/buyCooperativeIdentity_hhrzz?added=${added}`
				})
			},

			// 处理云主申请
			async handleCloudWorkerApply(item) {
				try {
					const res = await applyApi.getStaffApply()
					if (res.r === 0) {
						if (res.data.is_apply == 1) {
							// 续费
							uni.navigateTo({
								url: `/pages/identity/goumayunzhu?id=${res.data.id}`
							})
						} else {
							// 申请
							uni.navigateTo({
								url: '/pages/identity/apply_cloudWorker?back=1'
							})
						}
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				} catch (error) {
					uni.showToast({
						title: '操作失败',
						icon: 'none'
					})
				}
			},

			// 处理商家申请
			handleBusinessApply() {
				uni.navigateTo({
					url: '/pages/identity/applyBussinessId'
				})
			},

			// 处理厂家申请
			handleFactoryApply() {
				uni.navigateTo({
					url: '/pages/identity/changjia-a'
				})
			},

			// 处理历史记录操作
			handleHistoryAction(item) {
				if (item.state === 2) {
					// 修改信息
					this.modifyInfo(item)
				} else if (item.state === 3) {
					// 查看排行榜
					uni.navigateTo({
						url: '/pages/identity/ranking'
					})
				}
			},

			// 修改信息
			modifyInfo(item) {
				if (item.identity === '商家') {
					uni.navigateTo({
						url: `/pages/identity/applyBussinessId?id=${item.id}`
					})
				} else if (item.identity === '云主') {
					uni.navigateTo({
						url: `/pages/identity/apply_cloudWorker?id=${item.id}`
					})
				} else if (item.identity === '市运营') {
					uni.navigateTo({
						url: `/pages/identity/write-agent?id=${item.id}`
					})
				}
			},

			// 处理保险相关操作
			async handleInsurance(item) {
				if (item.policy_id == 0) {
					// 填写保障
					uni.setStorageSync('record_id', item.record_id)

					uni.showModal({
						title: '确认',
						content: '是否为本人',
						success: async (res) => {
							if (res.confirm) {
								try {
									const identityRes = await applyApi.getIdentityInfo()
									if (identityRes.r === 0) {
										if (identityRes.data.is_age_over == 0) {
											uni.navigateTo({
												url: '/pages/identity/write_baodanSelf'
											})
										} else {
											uni.showModal({
												title: '提示',
												content: identityRes.data.age_over_msg,
												success: (modalRes) => {
													if (modalRes.confirm) {
														uni.navigateTo({
															url: '/pages/identity/write_baodan'
														})
													}
												}
											})
										}
									}
								} catch (error) {
									uni.showToast({
										title: '操作失败',
										icon: 'none'
									})
								}
							} else {
								uni.navigateTo({
									url: '/pages/identity/write_baodan'
								})
							}
						}
					})
				} else {
					// 查看保障
					try {
						const res = await applyApi.getPolicyInfo({
							policy_id: item.policy_id,
							is_json: 1
						})
						if (res.r === 0) {
							uni.navigateTo({
								url: '/pages/identity/insurancePaper-web'
							})
						} else {
							uni.showToast({
								title: res.msg,
								icon: 'none'
							})
						}
					} catch (error) {
						uni.showToast({
							title: '操作失败',
							icon: 'none'
						})
					}
				}
			},

			// 申请合伙人
			applyPartner() {
				// 触发合伙人申请
				const partnerItem = this.applyList.find(item => item.identity === '合伙人')
				if (partnerItem) {
					this.handleApply(partnerItem)
				}
			},

			// 了解更多
			learnMore(identity) {
				uni.setStorageSync('urlId', identity)
				uni.navigateTo({
					url: '/pages/identity/know_more_new'
				})
			},

			// 显示支付密码弹窗
			showPayPasswordModal(title, callback) {
				this.payModalTitle = title
				this.payCallback = callback
				this.payPassword = ''
				this.payPasswordFirst = ''
				this.showPayModal = true
				this.checkPayPasswordStatus()
			},

			// 检查支付密码状态
			async checkPayPasswordStatus() {
				try {
					const res = await applyApi.checkPayPassword()
					if (res.r === 0) {
						this.isSetPassword = res.data.is_set === 1
						this.payModalTitle = this.isSetPassword ? '请输入支付密码' : '设置支付密码'
					}
				} catch (error) {
					console.error('检查支付密码状态失败:', error)
				}
			},

			// 支付密码输入处理
			async onPayPasswordInput() {
				if (this.payPassword.length < 6) return

				if (!/^\d{6}$/.test(this.payPassword)) {
					uni.showToast({
						title: '支付密码由六位数字组成',
						icon: 'none'
					})
					this.payPassword = ''
					return
				}

				if (!this.isSetPassword) {
					// 设置密码流程
					if (!this.payPasswordFirst) {
						this.payPasswordFirst = this.payPassword
						this.payPassword = ''
						this.payModalTitle = '请再次输入支付密码'
					} else {
						if (this.payPassword !== this.payPasswordFirst) {
							uni.showToast({
								title: '两次密码输入不一致',
								icon: 'none'
							})
							this.payPasswordFirst = ''
							this.payPassword = ''
							this.payModalTitle = '设置支付密码'
						} else {
							await this.setPayPassword()
						}
					}
				} else {
					// 验证密码
					await this.verifyPayPassword()
				}
			},

			// 设置支付密码
			async setPayPassword() {
				try {
					const res = await applyApi.setPayPassword({
						pay_pwd: this.md5(this.payPasswordFirst),
						pay_confirm_pwd: this.md5(this.payPassword)
					})
					if (res.r === 0) {
						uni.showToast({
							title: '支付密码设置成功',
							icon: 'success'
						})
						this.isSetPassword = true
						this.payModalTitle = '请输入支付密码'
						this.payPassword = ''
						this.payPasswordFirst = ''
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				} catch (error) {
					uni.showToast({
						title: '设置失败',
						icon: 'none'
					})
				}
			},

			// 验证支付密码
			async verifyPayPassword() {
				try {
					const res = await applyApi.verifyPayPassword({
						pay_pwd: this.md5(this.payPassword)
					})
					if (res.r === 0) {
						this.closePayModal()
						if (this.payCallback) {
							this.payCallback()
						}
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
						this.payPassword = ''
					}
				} catch (error) {
					uni.showToast({
						title: '验证失败',
						icon: 'none'
					})
					this.payPassword = ''
				}
			},

			// 关闭支付密码弹窗
			closePayModal() {
				this.showPayModal = false
				this.payPassword = ''
				this.payPasswordFirst = ''
				this.payCallback = null
			},

			// 关闭提示弹窗
			closeTipModal() {
				this.showTipModal = false
			},

			// 去实名认证
			goToIdentity() {
				this.closeTipModal()
				uni.navigateTo({
					url: '/pages/identity/buyCooperativeIdentity_hhrzz'
				})
			},

			// MD5加密（需要引入md5库或使用crypto-js）
			md5(str) {
				// 这里需要引入md5加密库
				// 可以使用crypto-js或其他md5库
				return str // 临时返回原字符串，实际使用时需要加密
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		background-color: #f7f7f7;
		min-height: 100vh;
	}

	.header-bag {
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
		height: 88rpx;
		background-color: #fff;
		border-bottom: 1rpx solid #e5e5e5;

		.back-btn {
			position: absolute;
			left: 30rpx;
			width: 40rpx;
			height: 40rpx;
		}

		.page-title {
			font-size: 36rpx;
			font-weight: 500;
			color: #333;
		}
	}

	.wrapper {
		padding: 0;
	}

	.shenqing-state {
		display: flex;
		background-color: #fff;

		.state-item {
			flex: 1;
			text-align: center;
			padding: 30rpx 0;

			.state-text {
				font-size: 32rpx;
				color: #666;

				&.active {
					color: #ff6b35;
					font-weight: 500;
				}
			}
		}
	}

	.divider {
		width: 100%;
		height: 20rpx;
		background-color: #f7f7f7;
	}

	.content-area {
		background-color: #fff;
		min-height: calc(100vh - 200rpx);
	}

	.tab-content {
		padding: 0 30rpx;
	}

	.apply-list {
		.apply-item {
			display: flex;
			// align-items: center;
			justify-content: space-between;
			padding: 30rpx 0;
			border-bottom: 1rpx solid #f0f0f0;

			&:last-child {
				border-bottom: none;
			}

			.item-left {
				display: flex;
				align-items: center;
				flex: 1;

				.item-icon {
					width: 80rpx;
					height: 80rpx;
					margin-right: 20rpx;

					image {
						width: 80rpx;
						height: 80rpx;
					}
				}

				.item-info {

					display: flex;
					flex-direction: column;



					.identity-name {
						font-size: 32rpx;
						font-weight: 500;
						color: #333;
						margin-bottom: 10rpx;

						.tips {
							font-size: 28rpx;
							color: #ff5033;
							
							font-weight: normal;
						}
					}

					.identity-desc {
						font-size: 24rpx;
						color: #666;
						line-height: 1.4;

						.learn-more {
							color: #333333;
							// text-decoration: underline;
						}
					}
				}
			}

			.item-right {
				.apply-btn {
					padding: 4rpx 32rpx;
					border-radius: 50rpx;
					color: #FF5033FF;
					border: 1rpx solid #FF0000;

					&.btn-normal {
						// background-color: #ff6b35;

						.btn-text {
							color: #ff6b35;
							line-height:28rpx;
							
						}
					}

					&.btn-disabled {
						background-color: #f5f5f5;
						border-color: #ddd;

						.btn-text {
							color: #999;
						}
					}

					&.btn-renew {
						background-color: #4CAF50;
						border-color: #4CAF50;

						.btn-text {
							color: #fff;
						}
					}

					.btn-text {
						font-size: 28rpx;
					}
				}
			}
		}
	}

	.history-content,
	.partner-content {

		.history-header,
		.partner-header {
			display: flex;
			background-color: #f8f8f8;
			padding: 20rpx 0;

			.header-item {
				flex: 1;
				text-align: center;
				font-size: 28rpx;
				color: #666;
				font-weight: 500;
			}
		}

		.history-list,
		.partner-list {

			.history-item,
			.partner-item {
				display: flex;
				align-items: center;
				padding: 30rpx 0;
				border-bottom: 1rpx solid #f0f0f0;

				.history-cell,
				.partner-cell {
					flex: 1;
					text-align: center;
					font-size: 28rpx;
					color: #333;
				}

				.history-btn,
				.partner-btn {
					padding: 12rpx 24rpx;
					border-radius: 6rpx;
					border: 1rpx solid #ff6b35;
					background-color: #ff6b35;

					&.btn-disabled {
						background-color: #f5f5f5;
						border-color: #ddd;

						.btn-text {
							color: #999;
						}
					}

					.btn-text {
						font-size: 24rpx;
						color: #fff;
					}
				}
			}
		}
	}

	.partner-scroll {
		height: 600rpx;
	}

	.loading-more {
		text-align: center;
		padding: 30rpx;
		color: #999;
		font-size: 28rpx;
	}

	.empty-state {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 200rpx 0;

		.empty-icon {
			width: 120rpx;
			height: 120rpx;
			margin-bottom: 30rpx;
		}

		.empty-text {
			font-size: 28rpx;
			color: #999;
		}
	}

	.no-partner {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 200rpx 0;

		.no-partner-img {
			width: 200rpx;
			height: 200rpx;
			margin-bottom: 40rpx;
		}

		.no-partner-text {
			font-size: 32rpx;
			color: #666;
			line-height: 1.6;

		}

		.no-partner-btn {
			display: inline-block;
			padding: 20rpx 60rpx;
			background-color: #FF0000;
			// border: 1rpx solid #FF0000;
			color: #fff;
			margin-top: 60rpx;
			border-radius: 50rpx;
			font-size: 32rpx;
		}
	}

	.pay-modal {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: rgba(0, 0, 0, 0.5);
		z-index: 1000;

		.pay-content {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			background-color: #fff;

			.pay-header {
				display: flex;
				align-items: center;
				justify-content: center;
				position: relative;
				height: 88rpx;
				border-bottom: 1rpx solid #e5e5e5;

				.close-btn {
					position: absolute;
					left: 30rpx;
					width: 40rpx;
					height: 40rpx;
				}

				.pay-title {
					font-size: 36rpx;
					font-weight: 500;
					color: #333;
				}
			}

			.pay-body {
				padding: 60rpx 30rpx;

				.pay-tip {
					font-size: 32rpx;
					color: #333;
					margin-bottom: 40rpx;
					text-align: center;
				}

				.pay-input {
					width: 100%;
					height: 80rpx;
					border: 1rpx solid #ddd;
					border-radius: 8rpx;
					padding: 0 20rpx;
					font-size: 32rpx;
					text-align: center;
					letter-spacing: 10rpx;
				}
			}
		}
	}

	.tip-modal {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: rgba(0, 0, 0, 0.5);
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 1000;

		.tip-content {
			width: 600rpx;
			background-color: #fff;
			border-radius: 16rpx;
			padding: 60rpx 40rpx 40rpx;
			text-align: center;

			.tip-title {
				font-size: 36rpx;
				font-weight: 500;
				color: #333;
				margin-bottom: 30rpx;
			}

			.tip-text {
				font-size: 28rpx;
				color: #666;
				line-height: 1.6;
				margin-bottom: 10rpx;
			}

			.tip-buttons {
				display: flex;
				margin-top: 60rpx;

				.tip-btn {
					flex: 1;
					height: 80rpx;
					line-height: 80rpx;
					font-size: 32rpx;
					border-radius: 8rpx;
					margin: 0 10rpx;

					&.cancel {
						background-color: #f5f5f5;
						color: #666;
					}

					&.confirm {
						background-color: #ff6b35;
						color: #fff;
					}
				}
			}
		}
	}
</style>